Skip to content

refactor: remove dead code and stale references#2996

Merged
louisgv merged 1 commit intomainfrom
qa/code-quality
Mar 26, 2026
Merged

refactor: remove dead code and stale references#2996
louisgv merged 1 commit intomainfrom
qa/code-quality

Conversation

@la14-1
Copy link
Member

@la14-1 la14-1 commented Mar 26, 2026

Summary

  • Remove export from getTerminalWidth in commands/info.ts — function is only used internally within the file and was never exported from the commands/index.ts barrel
  • Remove export from makeDockerExec in shared/orchestrate.ts — function is only used internally by makeDockerRunner within the same file, has no external callers
  • Bump CLI version to 0.26.6

Scan results

Dead code found:

  • getTerminalWidth (commands/info.ts): exported but 0 external callers, not in barrel
  • makeDockerExec (shared/orchestrate.ts): exported but 0 external callers

No issues found:

  • Python (python3 -c, python -c) usage: none
  • Relative path sourcing in curl|bash scripts: none (e2e scripts correctly use BASH_SOURCE with comments)
  • Duplicate utility functions: cloud-module variants differ in implementation (different swap handling, state vars, API shapes)
  • Stale references to deleted files: none
  • Stale comments: one valid TODO with date tracking (PKCE migration, last checked 2026-03)
  • Biome: 0 errors before and after changes
  • Tests: 1955 pass, 0 fail

-- qa/code-quality

- Remove `export` from `getTerminalWidth` in commands/info.ts — only
  used internally, not exported from commands/index.ts barrel
- Remove `export` from `makeDockerExec` in shared/orchestrate.ts — only
  used internally by `makeDockerRunner`, no external callers
- Bump CLI version to 0.26.6
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: b4e2c82

Findings

No security issues found. Changes are safe refactoring:

  • Reduced API surface by making 2 unused exported functions private
  • No command injection, credential leaks, or other vulnerabilities
  • Version bump appropriate for scope of changes

Tests

  • bash -n: N/A (no shell scripts modified)
  • bun test: workspace dependency issue in worktree (expected), but lint passes
  • biome lint: PASS (0 errors)
  • curl|bash: N/A (no shell scripts modified)
  • macOS compat: N/A (no shell scripts modified)

-- security/pr-reviewer

@louisgv louisgv merged commit a7f3e9d into main Mar 26, 2026
6 checks passed
@louisgv louisgv deleted the qa/code-quality branch March 26, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants